package com.wx.tnsadmin.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.springframework.data.annotation.Id;

import javax.persistence.Column;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author:LLH
 * @Date:2020/8/19
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
public class SysLog implements Serializable {

    /**
     * 操作ID
     */
    @Id
    @Column(name = "id")
    @ApiModelProperty(value = "操作ID")
    private String id;

    /**
     * 操作用户
     */
    @Length(max = 30, message = "操作用户 长度不能超过30")
    @Column(name = "username")
    @ApiModelProperty(value = "操作用户")
    private String username;

    /**
     * 用户操作
     */
    @Column(name = "operation")
    @ApiModelProperty(value = "用户操作")
    private String operation;

    /**
     * 请求主机ip
     */
    @Length(max = 255, message = "请求主机 长度不能超过255")
    @Column(name = "ip")
    @ApiModelProperty(value = "请求主机ip")
    private String ip;

    /**
     * 请求方法
     */
    @Length(max = 255, message = "请求方法 长度不能超过255")
    @Column(name = "method")
    @ApiModelProperty(value = "请求方法")
    private String method;

    /**
     * 请求路径
     */
    @Column(name = "url")
    @ApiModelProperty(value = "用户ID")
    private String url;

    /**
     * 映射地址
     */
    @Column(name = "mappedaddr")
    @ApiModelProperty(value = "映射地址")
    private String mappedaddr;

    /**
     * 请求参数
     */
    @Length(max = 65535, message = "请求参数 长度不能超过65535")
    @Column(name = "params")
    @ApiModelProperty(value = "请求参数")
    private String params;

    /**
     * 响应时间
     */
    @Column(name = "time")
    @ApiModelProperty(value = "响应时间")
    private Integer time;

    /**
     * 创建时间
     */
    @Column(name = "createtime")
    @ApiModelProperty(value = "创建时间")
    private Date createtime;

    /**
     * 当前页
     */
    @Column(name = "pageNum")
    @ApiModelProperty(value = "当前页")
    private Integer pageNum;

    /**
     * 每页数量
     */
    @Column(name = "pageSize")
    @ApiModelProperty(value = "每页数量")
    private Integer pageSize;

}
